<?php

namespace JLPay\Models\Openmerch\Change;

use JLPay\Models\BaseResponse;

/**
 * 结算账户变更响应
 */
class SettleAccountChangeResponse extends BaseResponse
{
    protected ?string $merchNo = null;
    protected ?string $applyId = null;

    /**
     * 构造函数
     *
     * @param array|null $responseArray
     */
    public function __construct(?array $responseArray = null)
    {
        parent::__construct($responseArray);
        
        if ($responseArray) {
            $this->merchNo = $responseArray['merch_no'] ?? null;
            $this->applyId = $responseArray['apply_id'] ?? null;
        }
    }

    /**
     * 获取商户号
     *
     * @return string|null
     */
    public function getMerchNo(): ?string
    {
        return $this->merchNo;
    }

    /**
     * 获取业务申请编号
     *
     * @return string|null
     */
    public function getApplyId(): ?string
    {
        return $this->applyId;
    }

    /**
     * 转换为数组
     *
     * @return array
     */
    public function toArray(): array
    {
        $data = parent::toArray();
        $data['merch_no'] = $this->merchNo;
        $data['apply_id'] = $this->applyId;
        return $data;
    }
} 